home *** CD-ROM | disk | FTP | other *** search
- /* $Header: tree.h,v 1.1 90/08/27 17:11:24 mara Exp $"
- *
- * tree.h
- *
- * Written by Mara Helmuth
- *
- * Description: Tree class for Cmix X graphical interface
- *
- * $Log: tree.h,v $
- * Revision 1.1 90/08/27 17:11:24 mara
- * Initial revision
- *
- * Revision 1.2 90/03/01 20:10:33 mara
- * *** empty log message ***
- *
- */
-
- class s_node {
- friend class ugen_tree;
- private:
- s_node *left,*right;
- int contents;
- };
-
- // ugen_tree stores indexes to ugen array
- class ugen_tree {
- private:
- s_node* root;
- int size;
- getinputtype get_left, get_right;
- unit_generator unit_gen;
- public:
- ugen_tree(int s, int out_ugen, getinputtype l, getinputtype r);
- void process_ugen(int p, int l, int r);
- void insert(s_node* parent);
- s_node* return_root() { return root; };
- void clear(s_node* n = 0,int first = 1);
- ~ugen_tree() { clear(); };
- };
-
-